Learn R Programming

vcd (version 0.9-0)

Pairs plot panel functions for off-diagonal cells: Off-diagonal Panel Functions for Table Pairs Plot

Description

Off-diagonal panel functions for pairs.table.

Usage

pairs_strucplot(panel = mosaic, 
  type = c("pairwise", "total", "conditional", "joint"),
  legend = FALSE, margins = c(0, 0, 0, 0), labeling = NULL,
  shade = FALSE, ...)
pairs_assoc(...)
pairs_mosaic(...)

Arguments

panel
function to be used for the plots in each cell---currently, assoc and mosaic are available.
type
character string specifying the type of independence model visualized in the cells.
legend
logical specifying whether a legend should be displayed in the cells or not.
margins
margins inside each cell (see strucplot).
labeling
labeling function or labeling-generating function (see strucplot).
shade
shading function or shading-generating function (see strucplot).
...
pairs_mosaic and pairs_assoc: parameters passed to pairs_assocplot. pairs_assocplot: other parameters passed to panel function.

Value

  • A function with arguments:
  • xcontingency table.
  • i,jcell coordiantes.

Details

These functions really just wrap assoc and mosaic by basically inhibiting labeling and legend-drawing and setting the margins to 0.

References

Cohen, A. (1980), On the graphical display of the significant components in a two-way contingency table. Communications in Statistics---Theory and Methods, A9, 1025--1041.

Friendly, M. (1992), Graphical methods for categorical data. SAS User Group International Conference Proceedings, 17, 190--200. http://www.math.yorku.ca/SCS/sugi/sugi17-paper.html

See Also

pairs.table, pairs_text, pairs_barplot, assoc, mosaic

Examples

Run this code
data(UCBAdmissions)
data(PreSex)

pairs(PreSex)
pairs(UCBAdmissions)
pairs(UCBAdmissions, upper_panel_args = list(shade = FALSE))
pairs(UCBAdmissions, lower_panel = pairs_mosaic(type = "conditional"))
pairs(UCBAdmissions, upper_panel = pairs_assoc)

Run the code above in your browser using DataLab